
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head lang="en">
  <meta charset="UTF-8">
  <title>登陆</title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="format-detection" content="telephone=no">
  <meta name="renderer" content="webkit">
  
  <meta name="_csrf" th:attr="content=${_csrf.token}"/>
  <meta name="_csrf_header" th:attr="content=${_csrf.headerName}"/>
   
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="alternate icon" type="image/png" href="/i/favicon.png">
  <link rel="stylesheet" type="text/css" media="screen" th:href="@{/library/select2/css/select2.min.css}" />
  <link rel="stylesheet" type="text/css" media="screen" th:href="@{/library/amazeui/css/amazeui.min.css}" />
  <link rel="stylesheet" type="text/css" media="screen" th:href="@{/library/securityKeyboard/i2msk.css}" />
  
  <script type="text/javascript" th:src="@{/library/jquery-3.3.1.min.js}"></script>
  <script type="text/javascript" th:src="@{/library/select2/js/select2.full.min.js}"></script>
  <script type="text/javascript" th:src="@{/library/securityKeyboard/i2msk.js}"></script>
  <script type="text/javascript" th:src="@{/library/securityKeyboard/i2msk-sm2.js}"></script>
  <script type="text/javascript" th:src="@{/js/commons.js}"></script>
  <script type="text/javascript" th:src="@{/js/login.js}"></script>
  <style>
    .header {
      text-align: center;
    }
    .header h1 {
      font-size: 200%;
      color: #333;
      margin-top: 30px;
    }
    .header p {
      font-size: 14px;
    }
  </style>
</head>
<body>
<div class="header">
  <div class="am-g">
    <h1 th:text="#{sys.title}"></h1>
    <p style="color: red;" th:if="${param.logout}">已注销</p>
    <p style="color: red;" th:if="${param.permission}">无权登陆</p>
    <p style="color: red;" th:if="${param.error != null and session.SPRING_SECURITY_LAST_EXCEPTION != null }" class="bg-danger" th:text="${session.SPRING_SECURITY_LAST_EXCEPTION.message}">有错误，请重试</p>
  </div>
  <hr />
</div>
<div class="am-g">
  <div class="am-u-lg-6 am-u-md-8 am-u-sm-centered">

    <form class="am-form" th:action="@{/login.do}" method="post">
      <label for="username">用户:</label>
      <input type="text" name="username" id="username" value="">
      <br>
      <label for="password">密码:</label>
      <input type="password" name="password" id="password" value="">
      <input type="hidden" name="expirationTime" th:value="${#dates.createNow().getTime()+(7*24*60*60*1000)}" />
      <br>
      <label for="_spring_security_remember_me">
        <input id="_spring_security_remember_me" name="_spring_security_remember_me" type="checkbox">记住密码
      </label>
      <br />
      <div class="am-g">
        <div class="am-u-sm-2 am-u-md-1 am-u-lg-1">
        	<input type="submit" name="" value="登 录" class="am-btn am-btn-primary am-btn-sm am-fl">
        </div>
        <div class="am-u-sm-3 am-u-md-4 am-u-lg-7">
          &nbsp;
        </div>
        <div class="am-u-sm-3 am-u-md-3 am-u-lg-2">
          <select id="locale">
		    <option value="en">英语</option>
		    <option value="zh" selected="selected">中文</option>
		  </select>
        </div>
        <div class="am-u-sm-3 am-u-md-3 am-u-lg-2">
        	<input id="switchLocale" type="button" value="切换语言" class="am-btn am-btn-primary am-btn-sm am-fl" />
        </div>
        <div class="am-u-sm-1 am-u-md-1 am-u-lg-0">
        	&nbsp;
        </div>
      </div>
    </form>
    <hr>
  </div>
</div>
</body>
</html>
